home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / misc / sci / Framsticks.lha / FramsticksInstall / Install < prev    next >
Encoding:
Text File  |  1998-09-21  |  6.5 KB  |  219 lines

  1. (if (< (/ @installer-version 65536) 43)
  2.         (abort "You need new installer!") )
  3.  
  4. (set cpu (database "cpu"))
  5. (set muiver (/ (getversion "mui:libs/muimaster.library") 65536))
  6. (set textfver (/ (getversion "sys:classes/gadgets/textfield.gadget") 65536))
  7. (set nlistver (/ (getversion "mui:libs/mui/nlist.mcc") 65536))
  8.  
  9. (set defbrowser "Multiview")
  10.  
  11. (set cpu (database "cpu"))
  12. (set #cpu -1)
  13. (set #badcpu 0)
  14. (if (= cpu "68020") (set #cpu 0))
  15. (if (= cpu "68030") (set #cpu 0))
  16. (if (= cpu "68040") (set #cpu 2)) 
  17. (if (= cpu "68060") (set #cpu 2))
  18. (set fpu (database "fpu"))
  19. (if (= #cpu 0) (if (= fpu "68881") (set #cpu 1)))
  20. (if (< #cpu 0) ((set #badcpu 1) (set #cpu 0)))
  21.  
  22. (set #povdir (if (exists "POVRAY3:" (noreq)) ("POVRAY3:") ("") )) 
  23.  
  24. ; (set #badcpu 1)
  25. ; (set muiver 0)
  26. ; (set nlistver 0)
  27. ; (set textfver 0)
  28.  
  29. (if #badcpu
  30.     (if (= 0 (askbool (prompt "Do you have 68020 or better?")
  31.                     (default 0)
  32.                     (help "The installer detected, that you have processor worse than 68020."
  33.                             " Framsticks application requires 68020 or better.")
  34.             ))
  35.             (abort "Framsticks can't work on your system")
  36.     )
  37. )
  38.  
  39. (set #missing "")
  40.  
  41. (if (< muiver 19)    (set #missing (cat #missing "\n*   MUI system v3.8 (C) Stefan Stuntz  \n  (latest version on aminet: dev/mui/mui38usr.lha")))
  42. (if (< textfver 3) (set #missing (cat #missing "\n*   Textfield.gadget v3 (C) Mark Thomas\n  (latest version on aminet: dev/gui/textfield.lha")))
  43. (if (< nlistver 19) (set #missing (cat #missing "\n*   NList.mcc v19 (C) Gilles Masson    \n  (latest version on aminet: dev/mui/MCC_NList0.84.lha")))
  44.  
  45. (if (<> "" #missing)
  46.     (if (= 0 (askbool (prompt
  47.             (cat "You dont have following libraries:\n"
  48.                   #missing
  49.                     "\n\nDo you want to continue installation?")
  50.                 )
  51.                 (help "The listed components are required to run Framsticks.\n"
  52.                         "You can continue installation and add these libraries later.\n"
  53.                         "(all the files are available on Aminet)"
  54.                 )
  55.             )
  56.         )
  57.         (abort "Some files are missing")
  58.     )
  59. )
  60.  
  61. ;(set @default-dest "ram:")
  62.  
  63. (set #makedirhere (askdir (prompt "Where do you want to install Framsticks"
  64.             "\n(directory 'Framsticks' will be created here)")
  65.                     (help @askdir-help)
  66.                     (default @default-dest)
  67.                )  
  68. )
  69.  
  70. (set @default-dest (tackon #makedirhere "Framsticks"))
  71.  
  72. (makedir @default-dest (infos))
  73.  
  74. (set #cpu (askchoice (choices "p68020" "68020+FPU" "68040" )
  75.              (prompt "You can install a version optimized for certain processor type. What processor do you own?")
  76.                      (help   #askcpu)
  77.                    (default #cpu)
  78.       )
  79. )
  80.  
  81. (set #xtra-doc 0)
  82. (set #xtra-examples 1)
  83. (set #xtra-snd 2)
  84. (set #xtra-anim 3)
  85. (set #xtra-pov 4)
  86.  
  87. (set #extras (askoptions
  88.                     (prompt "Select which extra files would you like to install")
  89.                     (choices "pHTML documentation"
  90.                     "Example species" "Sounds" "Transfer Animation"
  91.                     "POV-Ray Files")
  92.                                 (help 
  93.                     "Note: None of these files are required to run Framsticks. "
  94.                     "You can install it later by hand if needed.\n\n"
  95.                     "HTML Documentation - you need a HTML browser to use this\n"
  96.                     "Sounds and Transfer Animation - for your eyes and ears pleasure\n"
  97.                     "POV-Ray files - needed if you want to use POV Export function (available for registered users)\n"
  98.                                 )
  99.                     (default (if (= "" #povdir) 47 63 ) )
  100.                 )
  101. )
  102.  
  103. (set #whaticon (askchoice (choices "p2:1 resolution (PAL,NTSC)"
  104.                                                 "1:1 resolution (VGA)")
  105.              (prompt "Which icon should be installed?")
  106.                      (help "")
  107.                    (default 0)
  108.       )
  109. )
  110.  
  111. (if (in #extras 3)
  112. (set #whatanim (askchoice
  113.                         (prompt "Which transfer animation should be installed?")
  114.                         (choices "pSmall (good for PAL,NTSC)" "Big (good for high resolution)")
  115.                         (help "")
  116.                         (default #whaticon)
  117.       )
  118. ))
  119.  
  120. (if (in #extras 4)
  121.  (
  122.     (if (= "" #povdir)
  123.         (set #povdir
  124.             (askdir (prompt "You wanted to install POV-Ray files. "
  125.                     "Where is your POV-Ray directory?")
  126.             (help (cat "In order to work, POV-Ray files will be copied to "
  127.                     "'include' directory of your POV-Ray installation\n\n"
  128.                     "Proceed without selection, if you don't want to install these files\n\n" @askdir-help))
  129.             (disk) (default "")
  130.             )
  131.         )
  132.     )
  133.     (if (= "" #povdir)
  134.         ((message "\nPOV-Ray files installation cancelled!")
  135.          (set #extras (bitand #extras 47))
  136.         )
  137.     )
  138.  )
  139. )
  140.  
  141. (if (in #extras 0)
  142.  (set defbrowser
  143.     (askfile (prompt "Select your favorite HTML browser for Framsticks documentation")
  144.             (help "The program you select will be launched when you click on documentation icon. A browser that supports frames is recommended but not necessary.")
  145.             (default defbrowser)
  146.     )
  147.  )
  148. )
  149.  
  150. (copyfiles 
  151.     (source (select #cpu "Framsticks.020" "Framsticks.FPU" "Framsticks.040"))
  152.     (dest @default-dest) (newname "Framsticks")
  153.     (prompt "Copying main executable") (confirm) (help @copyfiles-help)
  154. )
  155.  
  156. (copyfiles (source (select #whaticon "files/hires-icon.info" "files/vga-icon.info"))
  157.     (dest @default-dest) (newname "Framsticks.info")
  158.     (prompt "Copying program icon") (confirm) (help @copyfiles-help)
  159. )
  160.  
  161. (copyfiles (source "framsticks.recent")
  162.     (dest @default-dest)
  163.     (prompt "Copying configuration file") (confirm) (help @copyfiles-help)
  164. )
  165.  
  166. (copyfiles (source "") (pattern "#?.sim")
  167.     (dest @default-dest)
  168.     (prompt "Copying simulator settings") (confirm) (help @copyfiles-help)
  169. )
  170.  
  171. (if (in #extras 0)(
  172.  
  173. (copyfiles (source "") (choices "docs") (dest @default-dest) (infos)
  174. (prompt "Copying documentation") (confirm) (help @copyfiles-help))
  175.  
  176. (tooltype (prompt "Setting pathname of your HTML browser") (help "")
  177.     (dest (tackon @default-dest "docs/doc_index.html"))
  178.     (setdefaulttool defbrowser))
  179.  
  180. ))
  181.  
  182. (if (in #extras 1)
  183. (copyfiles (source "species") (all) (dest (tackon @default-dest "species"))
  184. (prompt "Copying example species") (confirm) (help @copyfiles-help)
  185. ))
  186.  
  187. (if (in #extras 2)
  188. (copyfiles (source "sounds") (all) (dest (tackon @default-dest "sounds"))
  189. (prompt "Copying sound files") (confirm) (help @copyfiles-help)
  190. ))
  191.  
  192. (if (in #extras 3)
  193. (copyfiles (source (select #whatanim "files/small-transferanim" "files/big-transferanim"))
  194. (dest @default-dest) (newname "def_TransferAnimation") (infos) 
  195. (prompt "Copying transfer animation") (confirm) (help @copyfiles-help)
  196. ))
  197.  
  198. (if (in #extras 4)
  199. ((set #povinc (tackon #povdir "include"))
  200. (if (<> 2 (exists #povinc)) (makedir #povinc))
  201. (copyfiles (source "files") (choices "alife.inc" "alife2.inc")
  202.         (dest #povinc)
  203.     (prompt "Copying POV-Ray files") (confirm) (help @copyfiles-help))
  204. ))
  205.  
  206. (set #endmessage
  207.  "\nAuthors of Framsticks wish you a lot of fun with this program!"
  208. )
  209.  
  210. (if (<> "" #missing)
  211.     (set #endmessage
  212.     (cat #endmessage "\n\n...and don't forget to install missing files...\n"
  213.          #missing
  214.         "\n\nAny newer version is of course OK"
  215.         ))
  216. )
  217.  
  218. (exit #endmessage)
  219.